package com.atguigu.gmall.cart.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.cart.CartInfo;
import io.swagger.models.auth.In;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Author: lx
 * @Time: 10:52
 * @Description:
 */
@FeignClient(name = "service-cart")
public interface FeignCartClient {

    //加入购物车  临时用户 永久用户
    @GetMapping("/api/cart/addCart/{skuId}/{skuNum}")
    public Result addCart(
            @PathVariable Long skuId,
            @PathVariable Integer skuNum
    );
    @GetMapping("/api/cart/getCartInfo/{skuId}/{skuNum}")
    public CartInfo getCartInfo(  @PathVariable Long skuId,
                                  @PathVariable Integer skuNum);

    //商品清单
    @GetMapping("/api/cart/getCartCheckedList")
    public List<CartInfo> getCartCheckedList();
}
